package tds.model24.version2;
/**
 * @Company 杭州先锋电子技术股份有限公司
 * @ClassName Client
 * @Description 点菜的一个案例说明命令模式
 * @author tds
 * @Date 2020/2/6 21:45
 * @version 1.0.0
 */
public class Client {
    public static void main(String[] args) {
        // 创建服务员对象
        Waiter waiter = new Waiter();

        // 创建厨师对象
        Chef chef = new Chef();

        // 点2个烤鸡翅和1个烤羊肉
        Order order1 = new BakeChikenWing(chef);
        Order order2 = new BakeChikenWing(chef);
        Order order3 = new BakeMutton(chef);
        waiter.addOrder(order1);
        waiter.addOrder(order2);
        waiter.addOrder(order3);

        // 通知厨师菜单
        waiter.notifyChef();
    }
}
